package com.cc.teambuiding.service.Impl;

import com.cc.teambuiding.entity.Squad;
import com.cc.teambuiding.mapper.SquadMapper;
import com.cc.teambuiding.service.SquadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class SquadServiceImpl implements SquadService {

    @Autowired
    private SquadMapper squadMapper;

    @Override
    public List<Squad> listSquads() {
        return squadMapper.selectList(null);
    }

    @Override
    public boolean addSquad(Squad squad) {
        return squadMapper.insert(squad) > 0;
    }
}
